<template>
  <div>
    <el-row>
      <el-col :span="24" class="addRole">
        <!-- 查询 
        drawCode:"",
        makeNo:"",
        taskNo:'',
        taskSerialNo:'',
        code29:'',
        productReady:'' -->
        <el-popover placement="bottom-start" width="1000" style="margin-right:10px;" trigger="click">
          <el-form :inline="true" :model="search">
              <el-form-item label="图纸编号" >
                  <el-input v-model="search.drawCode"></el-input>
              </el-form-item>
              <el-form-item label="生产令号" >
                  <el-input v-model="search.makeNo"></el-input>
              </el-form-item>

              <el-form-item label="流水号" >
                  <el-input v-model="search.taskSerialNo"></el-input>
              </el-form-item>

              <el-form-item label="任务单号" >
                  <el-input v-model="search.taskNo"></el-input>
              </el-form-item>

              <el-form-item label="29所唯一编码" >
                  <el-input v-model="search. code29"></el-input>
              </el-form-item>
              <el-form-item label="完成状态">
                 <el-select  v-model="search.productReady" placeholder="请选择" class="width220">
                   <el-option label="已完成" value="1"></el-option>
                   <el-option label="未完成" value="0"></el-option>
                 </el-select>
              </el-form-item>
              <br>
              <el-button type="primary" style="float:right;" @click="searchBtn">确认</el-button>
              <el-button type="primary" style="float:right; margin-right:5px;" @click="reSearchBtn">重置</el-button>
          </el-form>
          <el-button slot="reference" type="primary" icon="el-icon-search">查询</el-button>
        </el-popover>
        <!-- <el-button type="primary" @click="showExcelDialog()">计划导入</el-button> -->
      </el-col>
    </el-row>
    <!-- 29所列表 -->
    <!-- <tableList29 ref="tableList29" :postData="postData">
      <template v-slot:default="scope">
        <el-button @click="showDialog('update',scope.row)" type="text" size="small">详情</el-button>
      </template>
    </tableList29> -->
    <el-table :data="tableList" stripe border class="user-table" :height="tableHeight" style="width: 100%;" >
      <el-table-column fixed type="index" label="序号" sortable min-width="30"></el-table-column>
      <el-table-column prop="taskNo" label="任务单号" sortable width="100"></el-table-column>
      <el-table-column prop="code29" label="29所编码" sortable width="100"></el-table-column>
      <el-table-column prop="taskSerialNo" label="任务流水号" sortable width="100"></el-table-column>
      <el-table-column prop="customerName.name" label="客户" sortable width="100" > </el-table-column>
      <el-table-column prop="planAttribute" label="计划属性" sortable width="100"></el-table-column>
      <!-- <el-table-column prop="priority" label="优先级" sortable min-width="100" > </el-table-column> -->
      <el-table-column prop="wbPlanFinsihDate" label="外包计划完成时间" sortable width="100" :formatter="timeFormatter"></el-table-column>
      <el-table-column prop="nums" label="件数" sortable width="60"></el-table-column>
      <el-table-column prop="makeNo" label="生产令号" sortable min-width="200"></el-table-column>
      <el-table-column prop="drawNo" label="图纸序号" sortable min-width="50"></el-table-column>
      <el-table-column prop="drawName" label="图纸名称" sortable min-width="120"></el-table-column>
      <el-table-column prop="drawNums" label="项目图纸张数"  width="50"  align="center"></el-table-column>
      <el-table-column prop="drawCode" label="图纸编号" sortable min-width="120"></el-table-column>
      <el-table-column prop="productReady" label="准备完成" width="80"  align="center">
        <template slot-scope="scope">
          <span v-if="scope.row. productReady ===1" class='el-icon-circle-check  cl-success fn-size18 '></span>
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" align="right" min-width="60">
        <template slot-scope="scope">
            <el-button @click="showDialog('update',scope.row)" type="text" size="small">详情</el-button>
            <!-- <el-button @click="showDialog('update',scope.row)" type="text" size="small">准备完成</el-button> -->
        </template>
      </el-table-column>
    </el-table>
    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pagination.currentPage" :page-sizes="[10, 15,20, 25,30,50, 100]" :page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"></el-pagination>
    <!-- 准备详情 -->
    <el-dialog class="bodyNopaddingTop" :title="dialog.title" :visible.sync="dialog.isShow"  v-dialogDrag width="1100px" @close='closeDialog'>
      <el-table :data="detailTableList" stripe border class="user-table"  style="width: 100%;" >
        <el-table-column prop="drawCode" label="图纸" sortable min-width="100"></el-table-column>
        <el-table-column prop="gxName" label="工序" sortable min-width="100"></el-table-column>
        <el-table-column prop="type" label="类型" sortable min-width="100"></el-table-column>
        <el-table-column prop="pName" label="名称" sortable min-width="100"></el-table-column>
        <el-table-column prop="code" label="规格" sortable min-width="100"></el-table-column>
        <el-table-column prop="count" label="数量" sortable min-width="100"></el-table-column>
        <el-table-column prop="installTypeName" label="装夹方式" sortable min-width="100"></el-table-column>
        <el-table-column prop="remark" label="备注" sortable min-width="100">
          <template slot-scope="scope">
            <div v-html="scope.row.remark"></div>
          </template>
        </el-table-column>
        <el-table-column prop="alink" label="附件" sortable min-width="100">
          <template slot-scope="scope">
            <!-- <div v-html="scope.row"></div> -->
            <el-button v-if="scope.row.imgSrc!=0" @click="showAlink(scope.row)" type="text">查看</el-button>
          </template>
        </el-table-column>

        <!-- <el-table-column prop="taskNo" label="操作" sortable min-width="100">
          <template slot-scope="scope">
            <el-button type="text">准备完成</el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <br>
      <el-form :inline="true" :model="detail">
          <el-form-item label="备注">
            <el-input v-model="detail.remark" type="textarea"></el-input>
          </el-form-item>
          <br> 
          <br> 
          <el-form-item>
            <el-button type="primary"  @click="onSubmitReady"  style="position: relative;left:35px; top:10px;">完成准备</el-button>
          </el-form-item>
      </el-form>
    </el-dialog>
    <!--计划任务详情-->
    <el-dialog class="bodyNopaddingTop" :title="dialogA.title" :visible.sync="dialogA.isShow"  v-dialogDrag width="1100px" @close='closeDialog'>
      <el-tabs v-model="dialog.activeName" @tab-click="dialogHandleClick">
        <el-tab-pane label="详情" name="1">
          <taskDetail29 :detailObj="dialog.formData" :type="dialog.type" @editSuccess="editSuccess" :editDisalbe="false"></taskDetail29>
        </el-tab-pane>
        <el-tab-pane label="29所工艺" name="2" v-if="dialog.title==='计划详情'">
          <!-- <el-button type="primary" @click="showDialog1('insert')">新增</el-button> -->
          <el-table :data="dialog.tableData" stripe border class="user-table" style="width: 100%;"> 
            <el-table-column fixed type="index" label="*" sortable min-width="30" align="center"></el-table-column>
            <el-table-column prop="processNo" label="工序号" sortable  min-width="30" align="center"></el-table-column>
            <el-table-column prop="processName" label="工序名称" sortable min-width="80" align="center"></el-table-column>
            <el-table-column prop="processTime" label="工时" sortable min-width="80"></el-table-column>
            <el-table-column prop="processPrice" label="外包工序工时/面积/单独报价" sortable min-width="80"></el-table-column>
            <el-table-column prop="nums" label="件数" sortable width="60"></el-table-column>
            <el-table-column prop="priority" label="优先级" sortable width="60"></el-table-column>
            <el-table-column prop="planCompleteDate" label="计划完成日期" sortable min-width="100"  :formatter="timeFormatter"></el-table-column>
            <el-table-column prop="startTime" label="任务开始时间" sortable min-width="100"  :formatter="timeFormatter"></el-table-column>
            <el-table-column prop="creatorName" label="创建人" sortable width="100"></el-table-column>
            <el-table-column prop="createTime" label="创建时间" sortable width="110" :formatter="timeFormatter"></el-table-column>
            <el-table-column fixed="right" label="操作" align="center" min-width="80">
              <template slot-scope="scope">
                <el-button @click="showDialog1('update',scope.row)" type="text" size="small">详情</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="图纸上传" name="3" v-if="dialog.title==='计划详情'">
          <el-upload class="upload-demo" ref="drawingUp" :action="pdfActionUrl" :before-upload="beforeAvatarUpload" :data="dialog.uploadData" :on-success="handleAvatarSuccess"  multiple :limit="1">
            <el-button size="small" type="primary">点击上传</el-button>
          </el-upload>
           <uploadList :upLoadType="1" :drawNo="dialog.drawCode"  ref="drawing"></uploadList>
        </el-tab-pane>
        <el-tab-pane label="工艺上传" name="4" v-if="dialog.title==='计划详情'">
          <el-upload class="upload-demo" ref="technologyUp" :action="pdfActionUrl" :before-upload="beforeAvatarUpload" :data="dialog.uploadData" :on-success="handleAvatarSuccess"  multiple :limit="1">
            <el-button size="small" type="primary">点击上传</el-button>
          </el-upload>
           <uploadList :upLoadType="2" :drawNo="dialog.drawCode"  ref="technology"></uploadList>
        </el-tab-pane>
        <el-tab-pane label="图形文件上传" name="5" v-if="dialog.title==='计划详情'">
          <el-upload class="upload-demo" ref="graphicsFileUp" :action="pdfActionUrl" :before-upload="beforeAvatarUpload" :data="dialog.uploadData"  :on-success="handleAvatarSuccess"  multiple :limit="1">
            <el-button size="small" type="primary">点击上传</el-button>
          </el-upload>
           <uploadList :upLoadType="3" :drawNo="dialog.drawCode"  ref="graphicsFile"></uploadList>
        </el-tab-pane>
      </el-tabs>
    </el-dialog>
    
  <!-- 新增编辑29所计划任务详情 -->
    <el-dialog class="bodyNopaddingTop" :title="dialog1.title" :visible.sync="dialog1.isShow" v-dialogDrag>
      <processPlanDetail29 :formData="dialog1.formData" :type="dialog1.type" :tid="dialog.formData.tid" @editSuccess="editSuccess1"></processPlanDetail29>
    </el-dialog>
   <!-- 详情排版  -->
    <el-dialog class="bodyNopaddingTop" :title="dialogDetail.title" :visible.sync="dialogDetail.isShow" v-dialogDrag>
      <!-- <h2>装夹方式:{{installTypeName}}</h2> -->
      <br>
      <br>
      <h1 style="color: #FFFFFF;background-color: #3ac1c4;margin-bottom:15px;padding:5px 0px 5px 15px; border-radius:3px;">适配机器</h1>
      <el-table :data="fitMacs" stripe border class="user-table" style="width: 100%;">
            <el-table-column prop="id" label="ID" sortable min-width="80"></el-table-column>
            <el-table-column prop="name" label="设备名称" sortable min-width="80"></el-table-column>
            <el-table-column prop="code" label="设备编码" sortable min-width="80"></el-table-column>
      </el-table>
      <br>
      <h1 style="color: #FFFFFF;background-color: #3ac1c4;margin-bottom:15px;padding:5px 0px 5px 15px; border-radius:3px;">程序</h1>
      <el-table :data="drawInfos" stripe border class="user-table" style="width: 100%;">
        <el-table-column prop="fileName" label="名称" sortable min-width="100"></el-table-column>
        <el-table-column prop="creatorName" label="上传人" sortable width="100"></el-table-column>
        <el-table-column prop="createTime" label="上传时间" sortable width="160"></el-table-column>
        <el-table-column fixed="right" label="操作" align="center" width="120">
          <template slot-scope="scope">
            <el-button @click="download(scope.row)" type="text" size="small">下载</el-button>
            <!-- <el-button @click="viewFile(scope.row)" type="text" size="small"><span class="cl-warning">预览</span></el-button> -->
          </template>
        </el-table-column>
      </el-table>
      <br>
      <br>
      <h1 style="color: #FFFFFF;background-color: #3ac1c4;margin-bottom:15px;padding:5px 0px 5px 15px; border-radius:3px;">图纸</h1>
    <center><img :src="imgSrc" style="border:1px solid gray;"/></center>
    </el-dialog>
 
    <!-- 打印 -->

  </div>
</template>
<script>
import pdf from 'vue-pdf';
import planApi from 'plugins/axios/planApi.js';
import baseApi from 'plugins/axios/baseApi.js';
import uploadList from 'views/components/uploadList.vue' /**1-图纸上传、2-工艺上传、3-图形文件上传 的列表组件 */
import tableList29 from 'views/components/tableList29.vue' /**29所列表组件 */
import taskDetail29 from 'views/components/taskDetail29.vue' /**29所任务详情组件 */
import processPlanDetail29 from 'views/components/processPlanDetail29.vue' /**29所工序详情组件 */

export default {
  components: {
    pdf,
    uploadList,
    tableList29,
    taskDetail29,
    processPlanDetail29
  },
  data(){
    return {
      loading:false,
      status:'0',
      postData:{
        isMaterialArrvie:0,
        isMaterialTailor:0
      },
      currentRowId:'',
      currentRow:'',
      machineAllList:[],/**所有机器列表 */
      isSearchBtn:false,
      search:{
        drawCode:"",
        makeNo:"",
        taskNo:'',
        taskSerialNo:'',
        code29:'',
        productReady:''
      },
      detail:{
        remark:'',
      },
      dialog:{/**弹框配置 */
        title:'',
        isShow:false,
        type:'',
        formData:{},
        activeName:'2',
        otherUpDataData:{},
        uploadData:{
          drawInfo:"",
        },/**上传图纸需要额外提交的数据 */
        tableData:[],
        drawCode:''
      }, 
      dialogDetail:{/**弹框配置 */
        title:'',
        isShow:false,
        type:'',
        formData:{},
        activeName:'2',
        otherUpDataData:{},
        uploadData:{
          drawInfo:"",
        },/**上传图纸需要额外提交的数据 */
        tableData:[],
        drawCode:''
      },
      dialogA:{
        title:'',
        isShow:false,        
      },
      pdfActionUrl: baseApi.drawInfoUpload(),
      dialog1:{
        title:'',
        type:'',
        isShow:false,
        formData:{}
      },
      pagination:{/**分页参数 */
        currentPage:1,
        pageSize:10,
        total:0
      },
      installTypeName:'',
      imgSrc:'',
      drawInfos:[],
      fitMacs:[],
      tableList:[],
      detailTableList:[],
    }
  },
  computed:{
    tableHeight(){
      return this.$store.state.clientHeight-184;
    }
  },
  created(){},
  mounted(){
    this.status = this.$route.query.status;
    this.getTablList();
  },
  watch: {
    $route(){
      this.status = this.$route.query.status;
      this.search.drawCode="";
      this.search.makeNo="";
      this.search.productReady =this.status;
      this.getTablList();
    }
  },
  methods:{
    cellClassName({row, column, rowIndex, columnIndex}){
      if(columnIndex>0&&columnIndex<6){
        return 'nopadding'
      }
    },
    showAlink(row){
      let self = this;
      self.drawInfos =  row.drawInfos;
      if(self.drawInfos.length>0){
            self.drawInfos.forEach(item=>{
              let fileNameArray = item.path.split('\\');
              item.fileName =fileNameArray[fileNameArray.length-1];
            })
          }
      self.dialogDetail.isShow = true;
      self.fitMacs = row.fitMacs;
      self.imgSrc =  row.imgSrc;
      self.installTypeName =  row.installTypeName;
    },
    onSubmitReady(){
      let self = this;
      let param = {
        id:self.currentRowId,
        productReadyRemark:self.detail.remark
      };
      planApi.updateReadyStatus(param).then(res=>{
         self.dialogDetail.isShow = false;
         self.getTablList();
      });
    },
    /**时间格式化 */
    timeFormatter(row, column, cellValue, index){
      return cellValue?this.timestampToTime(cellValue,'yyyy-mm-dd'):'';
    },
    /**29所计划列表 */
    getTablList(){
      let self = this;
      let param = {
        currentPage:self.isSearchBtn?1:self.pagination.currentPage,
        pageSize:self.pagination.pageSize,
        taskNo:self.search.taskNo,
        taskSerialNo:self.search.taskSerialNo,
        drawCode:self.search.drawCode,
        code29:self.search.code29,
        taskNo:self.search.taskNo,
        productReady:self.search.productReady
      };
      planApi.queryProReadyByCondition(param).then(res=>{
        self.tableList = res.content.records;
        self.isSearchBtn = false;
        self.pagination.total = res.content.total;
      });
      // self.$refs.tableList29.get29TableList()
    },
    queryPreadyDetall(){
      let self = this;
      planApi.queryProReadyDetail(self.currentRowId).then(res=>{
        self.currentRow = res.content;
       
        self.setDetailTableData();
      });
    },
    setDetailTableData(){
      let self = this;
      self.detailTableList = [];
      //设置详情表格数据，由于查询出来是离散数据，所以得进行前端容器el-table 的数据规范转化，即将后端查询的离散数据加工层复合el-table规范的数据格式。
      let  gxList = self.currentRow.taskProcessList; 
      console.info(gxList);
      //由于后台只查询了数铣的工序数据，并且其有N+性，故规范 gxName字段 以“数铣A”、“数铣B”....的形式进行加工
      let gxName = '数铣';
      //第一层 工序 
          if(gxList!=undefined && gxList!=null && gxList.length!=0){
            let index = 1;
              gxList.forEach(element => {
                //第二层 工装、量具、加工面
                //工装+量具
                //alert(element.processProductionList.length);
                element.processProductionList.forEach(item=>{
                  console.info("*******************");
                  console.info(item);
                  console.info("*******************");
                  //alert(item.content);
                  self.detailTableList.push({
                    drawCode:self.currentRow.drawCode,
                    gxName:gxName +index,
                    type:item.production.groupId,//.name,
                    pName:item.production.name,
                    code:item.production.code,
                    count:item.count,
                          imgSrc:0,
                          drawInfos:0,
                          fitMacs:0,
                          drawInfos:0,
                          installTypeName:0,
                    remark:element.content,
                  });
                });
                //加工面+刀具+程序
                element.taskDetails.forEach(item=>{
                  //刀具
                      item.cutterList.forEach(element=>{
                        self.detailTableList.push({
                          drawCode:self.currentRow.drawCode,
                          gxName:gxName +index,
                          type:item.processFaceName+'面刀具',
                          pName:element.name,
                          code:element.code,
                          count:1,
                          imgSrc:item.path,
                          drawInfos:item.drawInfos,
                          fitMacs:item.fitMacs,
                          drawInfos:item.drawInfos,
                          installTypeName:item.installTypeName,
                          alink:'<a target=\"_blank\" href=\"'+item.path+'\"></a>',
                          remark:item.techReq,
                        });
                      });
                  //程序
                });
                index++;
              });
          }
      //第三层 加工面 所需 刀具 程序
    },
    reSearchBtn(){
      let self = this;
      self.search={
        drawCode:"",
        makeNo:"",
        taskNo:'',
        taskSerialNo:'',
        code29:'',
        productReady:''
      };
      self.getTablList();     
    },
    searchBtn(){
      let self = this;
      self.isSearchBtn = true;
      this.getTablList();
    },
    showDialog(type,row){
      this.dialog.activeName='2';
      this.dialog.type =type;
      switch(type){
        case 'insert':
          this.dialog.isShow=true;
          this.dialog.formData={};
          this.dialog.title = '新增计划任务';
          break;
        case 'update':
          this.dialog.isShow=true;
          this.currentRow = row;
          this.currentRowId = row.id;
          this.detail.remark = row.remark;    
          this.dialog.title = '准备详情';
          this.queryPreadyDetall();
          break;
        case 'print':
           this.dialog.formData = row;
           this.$refs.print1.getCgPdfData(row.id);
          break;
      } 
    },
    showDialog1(type,row){
      this.dialog1.isShow=true;
      this.dialog1.type=type;
      switch(type){
        case 'insert':
          this.dialog1.formData={};
          this.dialog1.title = '新增29所工艺详情';
          break;
        case 'update':
          this.dialog1.formData = row;
          this.dialog1.title = '编辑29所工艺详情';
          break;
      }
    },
    /**修改成功后更新表格关闭弹框*/ 
    editSuccess(){
      this.dialog.isShow=false;
      this.getTablList();
      this.$message.success(`${this.dialog.title}成功`);
    },
    editSuccess1(){
      this.dialog1.isShow=false;
      this.$message.success(`${this.dialog1.title}成功`)
      this.getPlanTaskDetailList();
    },
    onSubmit(formName){
      let self = this;
      self.$refs[formName].validate((valid) => {
          if (valid) {
            switch(formName){
              case 'ruleForm1':
                if(self.dialog1.type==='insert'){
                  self.dialog1.formData.tid=self.dialog.formData.id;
                }
                planApi.insertUpdatePlanTask(self.dialog1.type,self.dialog1.formData).then(res=>{
                  self.dialog1.isShow=false;
                  self.$message({
                    message: `${self.dialog1.title}成功`,
                    type: 'success'
                  });
                  self.getPlanTaskDetailList();
                })
                break;
            }  
          }
        });
    },
    /**详情切换tab*/ 
    dialogHandleClick(){
      let self = this;
      switch(self.dialog.activeName){
        case '2':
          self.getPlanTaskDetailList();
          break;
         case '3':
           self.$refs.drawing.getTableList();
           self.dialog.otherUpDataData.type=1;
           self.dialog.uploadData.drawInfo = JSON.stringify(self.dialog.otherUpDataData);
          break;
         case '4':
           self.$refs.technology.getTableList();
           self.dialog.otherUpDataData.type=2;
           self.dialog.uploadData.drawInfo = JSON.stringify(self.dialog.otherUpDataData);
          break;
        case '5':
          self.$refs.graphicsFile.getTableList();
          self.dialog.otherUpDataData.type=3;
          self.dialog.uploadData.drawInfo = JSON.stringify(self.dialog.otherUpDataData);
          break;
      }
    },
    /**获取任务详情列表*/ 
    getPlanTaskDetailList(){
        let self = this;
        planApi.planTaskDetailList1(self.dialog.formData.id).then(res=>{
        self.dialog.tableData=res.content;
      })
    },
    beforeAvatarUpload(file){/**文件上传前格式和大小的验证*/
      console.log(file);
      return true;
    },
    /**计划导入之前格式的判断 */
    beforeAvatarUpload1(file){
      const isExcel = (file.type=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")||(file.type == 'application/vnd.ms-excel');
      if(!isExcel){
        this.$message.error('只能上传Excel文件!');
      }
      return isExcel;
    },
    /**计划导入后执行的方法*/
    handleAvatarSuccess1(response, file, fileList){
     if(response.statusCode==="200"){
        this.dialog4.isShow = false;
        this.$message.success('上传成功');
        this.getTablList();
     }else{
       this.$message.error(response.desc);
       this.$refs.upload.clearFiles(); 
     } 
    },
    /**图纸上传、工艺上传、图形文件上传后执行的方法**/ 
    handleAvatarSuccess(response, file, fileList){
      console.log(response);
      if(response.statusCode==="200"){
        this.$message.success('上传成功');
        switch(this.dialog.otherUpDataData.type){
          case 1:
            this.$refs.drawingUp.clearFiles();
            this.$refs.drawing.getTableList()
            break;
          case 2:
            this.$refs.technologyUp.clearFiles();
            this.$refs.technology.getTableList();
            break;
          case 3:
            this.$refs.graphicsFileUp.clearFiles();
            this.$refs.graphicsFile.getTableList();
            break;
        }
      }else{
         this.$message.error(response.desc);
      }
    },
    /**关闭弹框*/ 
    closeDialog(){
      this.status!=='1'?this.getTablList():'';
    },
    /**显示Excel弹框*/ 
    showExcelDialog(){
      let self = this;
      self.dialog4.isShow= true;
      self.dialog4.title = '导入Excel文件';
    },
    handleSizeChange(size){/**切换分页条数 */
      this.pagination.pageSize=size;
      this.pagination.currentPage=1;
      this.getTablList();
    },
    handleCurrentChange(current){/**切换分页页数 */
      this.pagination.currentPage=current;
      this.postData.isSearchButton = false;
      this.getTablList();
    },
    download(row){
       window.location.href= baseApi.mergenDownload({id:row.id});
    },
    /**预览pdf 文件 */
    viewFile(row){
      let self = this;
      self.dialog.isShow =true;
      self.dialog.pdfOption.drawingSrc =  baseApi.viewBigFile(row.id);
    } 
  }
}
</script>
<style lang="stylus" scoped>
  .addRole
    padding-bottom 10px
  .content-rowspan div
    padding-left: 13px;
    line-height: 46px;
    border-bottom: 1px solid #ECEDEE;
    &:last-child
       border-bottom:none
</style>
